<?php /*a:4:{s:62:"/www/wwwroot/yinglinet.cn/app/admin/view/basic/userconfig.html";i:1704969716;s:57:"/www/wwwroot/yinglinet.cn/app/admin/view/base/header.html";i:1699343568;s:57:"/www/wwwroot/yinglinet.cn/app/admin/view/base/footer.html";i:1699343568;s:57:"/www/wwwroot/yinglinet.cn/app/admin/view/base/unitjs.html";i:1699343568;}*/ ?>
<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>项目</title>
    <link rel="stylesheet" href="/static/component/pear/css/pear.css">
    <link rel="stylesheet" href="/static/component/code/css/style.css">
        <script src="/static/user/js/jquery.min.js"></script>
    <script type="text/javascript" src="/static/component/layui/layui.js"></script>
    <script src="/static/component/pear/pear.js"></script>
</head>

<body class="pear-container">
      <style>
        .layui-form-label{
            width: 110px;
        }
        .layui-input-block{
            margin-left: 140px;
        }
        .userp_1{
            position: relative;
        }
        .userp_2{
            position:absolute;
            right:20px;
            top:8px;
            font-weight: bold;
        }
      </style>
        <div class="layui-card"></div>
        <div class="layui-card ">
            <div class="layui-card">
                <div class="layui-card-header"><?php echo htmlentities($msgtitle); ?></div>
            </div>
          
            <div class="layui-card-body">
                <form class="layui-form " id="formId">
                    <?php switch(app('request')->get('id')): case "11": ?>
                    <div class="layui-col-md6"> 
                      <div class="layui-form-item">
                        <label class="layui-form-label">检测金额</label>
                        <div class="layui-input-block userp_1">
                          <input type="text" name="price" value="<?php echo htmlentities((isset($msg['price']) && ($msg['price'] !== '')?$msg['price']:'')); ?>" lay-verify="required|validateMoney" required   placeholder="请输入检测金额" autocomplete="off" class="layui-input">
                          <span class="userp_2">元</span>
                          </div>
                      </div>
                      </div>
                    <?php break; case "1": ?>
                    <div class="layui-col-md6"> 
                    <div class="layui-form-item">
                      <label class="layui-form-label">备案信息</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="beianmsg" value="<?php echo htmlentities((isset($msg['beianmsg']) && ($msg['beianmsg'] !== '')?$msg['beianmsg']:'')); ?>" required   placeholder="请输入备案信息" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">元</span> -->
                        </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">备案号</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="beian_sn" value="<?php echo htmlentities((isset($msg['beian_sn']) && ($msg['beian_sn'] !== '')?$msg['beian_sn']:'')); ?>" required   placeholder="请输入备案号" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">L</span> -->
                    </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">版权归属</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="banquan_msg" value="<?php echo htmlentities((isset($msg['banquan_msg']) && ($msg['banquan_msg'] !== '')?$msg['banquan_msg']:'')); ?>" required   placeholder="请输入版权归属" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">客服电话</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="kf_tel" value="<?php echo htmlentities((isset($msg['kf_tel']) && ($msg['kf_tel'] !== '')?$msg['kf_tel']:'')); ?>" required   placeholder="请输入客服电话" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    
                    <div class="layui-form-item">
                      <label class="layui-form-label">短信账号</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="sms_user" value="<?php echo htmlentities((isset($msg['sms_user']) && ($msg['sms_user'] !== '')?$msg['sms_user']:'')); ?>" required   placeholder="请输入短信接口账号" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">短信密码</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="sms_pwd" value="<?php echo htmlentities((isset($msg['sms_pwd']) && ($msg['sms_pwd'] !== '')?$msg['sms_pwd']:'')); ?>" required   placeholder="请输入短信接口密码" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    
                    
                    
                  </div>
                      <?php break; case "2": if(is_array($_sht12) || $_sht12 instanceof \think\Collection || $_sht12 instanceof \think\Paginator): $i = 0; $__LIST__ = $_sht12;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                      <div class="layui-col-md4">
                      <?php echo htmlentities($vo); ?>
                      <hr>
                        <div class="layui-form-item ">
                            <label class="layui-form-label">财富估值</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="sgt[<?php echo htmlentities($key); ?>][cfgz]" value="<?php if(!empty($msg['sgt'][$key]['cfgz'])): ?><?php echo htmlentities($msg['sgt'][$key]['cfgz']); ?><?php endif; ?>" required   placeholder="请输入财富估值" autocomplete="off" class="layui-input">
                            <!-- <span class="userp_2">元</span> -->
                        </div>
                        </div>
                        <div class="layui-form-item ">
                          <label class="layui-form-label">年龄特质</label>
                          <div class="layui-input-block userp_1">
                          <input type="text" name="sgt[<?php echo htmlentities($key); ?>][nltz]" value="<?php if(!empty($msg['sgt'][$key]['nltz'])): ?><?php echo htmlentities($msg['sgt'][$key]['nltz']); ?><?php endif; ?>" required   placeholder="请输入年龄特质" autocomplete="off" class="layui-input">
                          <!-- <span class="userp_2">元</span> -->
                      </div>
                      </div>
                      <div class="layui-form-item ">
                            <label class="layui-form-label">交友类型</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="sgt[<?php echo htmlentities($key); ?>][jylx]" value="<?php if(!empty($msg['sgt'][$key]['jylx'])): ?><?php echo htmlentities($msg['sgt'][$key]['jylx']); ?><?php endif; ?>" required   placeholder="请输入交友类型" autocomplete="off" class="layui-input">
                            <!-- <span class="userp_2">元</span> -->
                        </div>
                      </div>
                      <div class="layui-form-item ">
                            <label class="layui-form-label">交友优势</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="sgt[<?php echo htmlentities($key); ?>][jyys]" value="<?php if(!empty($msg['sgt'][$key]['jyys'])): ?><?php echo htmlentities($msg['sgt'][$key]['jyys']); ?><?php endif; ?>" required   placeholder="请输入交友优势" autocomplete="off" class="layui-input">
                            <!-- <span class="userp_2">元</span> -->
                        </div>
                      </div>
                    </div>
                      <?php endforeach; endif; else: echo "" ;endif; break; case "5": ?> 
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级A</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="A" value="<?php echo htmlentities((isset($msg['A']) && ($msg['A'] !== '')?$msg['A']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级B</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="B" value="<?php echo htmlentities((isset($msg['B']) && ($msg['B'] !== '')?$msg['B']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级C</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="C" value="<?php echo htmlentities((isset($msg['C']) && ($msg['C'] !== '')?$msg['C']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级D</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="D" value="<?php echo htmlentities((isset($msg['D']) && ($msg['D'] !== '')?$msg['D']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级E</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="F" value="<?php echo htmlentities((isset($msg['F']) && ($msg['F'] !== '')?$msg['F']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>

                  
               
                      <?php break; case "6": ?>
                      <div class="layui-form-item">
                        <label class="layui-form-label">17%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b17" value="<?php echo htmlentities((isset($msg['b17']) && ($msg['b17'] !== '')?$msg['b17']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">36%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b36" value="<?php echo htmlentities((isset($msg['b36']) && ($msg['b36'] !== '')?$msg['b36']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">59%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b59" value="<?php echo htmlentities((isset($msg['b59']) && ($msg['b59'] !== '')?$msg['b59']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">74%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b74" value="<?php echo htmlentities((isset($msg['b74']) && ($msg['b74'] !== '')?$msg['b74']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">87%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b87" value="<?php echo htmlentities((isset($msg['b87']) && ($msg['b87'] !== '')?$msg['b87']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                      <?php break; case "7": ?>
                      <div class="layui-form-item">
                        <label class="layui-form-label">22%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b22" value="<?php echo htmlentities((isset($msg['b22']) && ($msg['b22'] !== '')?$msg['b22']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">38%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b38" value="<?php echo htmlentities((isset($msg['b38']) && ($msg['b38'] !== '')?$msg['b38']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">46%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b46" value="<?php echo htmlentities((isset($msg['b46']) && ($msg['b46'] !== '')?$msg['b46']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">63%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b63" value="<?php echo htmlentities((isset($msg['b63']) && ($msg['b63'] !== '')?$msg['b63']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">82%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b82" value="<?php echo htmlentities((isset($msg['b82']) && ($msg['b82'] !== '')?$msg['b82']:'')); ?>" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                      <?php break; case "10": ?>
                      <div class="layui-form-item">
                        <label class="layui-form-label">多元特征</label>
                        <div class="layui-input-block userp_1">
                          <div class="layui-btn-container tag" style="padding-top: 5px;" id="tabId1" lay-filter="tabId1" lay-allowclose="true" lay-newTag="true">
                            <?php $msg['data']=json_decode($msg['data'],true); if(is_array($msg['data']) || $msg['data'] instanceof \think\Collection || $msg['data'] instanceof \think\Paginator): $i = 0; $__LIST__ = $msg['data'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>  
                              <button lay-id="<?php echo htmlentities($i); ?>" type="button" class="tag-item"><?php echo htmlentities($vo); ?></button>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                          </div>
                        </div>
                        <input type="hidden" name="data" id="tabId1_input" value="">
                    </div>
                    <?php break; case "12": ?>
                    <div class="layui-form-item">
                      <label class="layui-form-label">反馈类型</label>
                      <div class="layui-input-block userp_1">
                        <div class="layui-btn-container tag" style="padding-top: 5px;" id="tabId1" lay-filter="tabId1" lay-allowclose="true" lay-newTag="true">
                          <?php $msg['data']=json_decode($msg['data'],true); if(is_array($msg['data']) || $msg['data'] instanceof \think\Collection || $msg['data'] instanceof \think\Paginator): $i = 0; $__LIST__ = $msg['data'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>  
                            <button lay-id="<?php echo htmlentities($i); ?>" type="button" class="tag-item"><?php echo htmlentities($vo); ?></button>
                          <?php endforeach; endif; else: echo "" ;endif; ?>
                        </div>
                      </div>
                      <input type="hidden" name="data" id="tabId1_input" value="">
                  </div>

                      <?php break; case "13": ?>
                      <div class="layui-form-item">

                        <label class="layui-form-label">通用小知识</label>
  
                        <div class="layui-input-block ">
  
                          <textarea id="tucontent1" type="text/plain" style="height: 200px;"
                          name="tucontent1" ><?php echo htmlentities((isset($msg['tucontent1']) && ($msg['tucontent1'] !== '')?$msg['tucontent1']:'')); ?></textarea>
                        </div>
                      </div>
                      <div class="layui-form-item">

                        <label class="layui-form-label">申请小技巧</label>
  
                        <div class="layui-input-block ">
  
                          <textarea id="tucontent2" type="text/plain" style="height: 200px;"
                          name="tucontent2" ><?php echo htmlentities((isset($msg['tucontent2']) && ($msg['tucontent2'] !== '')?$msg['tucontent2']:'')); ?></textarea>
                        </div>
                      </div>
                      <?php break; case "14": ?>
                        <!---->
                        <div class="layui-form-item">

                        <label class="layui-form-label">百度统计js代码</label>
  
                        <div class="layui-input-block">
                          <textarea id="tucontent10" class="layui-textarea"
                          name="tucontent10" style="height:500px;"><?php echo htmlentities($msg['tucontent10']); ?></textarea>
                        </div>
                      </div>
                      <?php break; ?>
                    <?php endswitch; ?>
                    <div class="layui-form-item">
                      <div class="layui-input-block">
                        <button class="pear-btn pear-btn-primary pear-btn-sm" lay-submit lay-filter="form-save"><i class="layui-icon layui-icon-ok"></i>确认信息</button>
                        <button type="reset" class="pear-btn  pear-btn-sm"><i class="layui-icon layui-icon-refresh"></i>重置</button>
                      </div>
                    </div>
                  </form>
            </div>
        </div>
        <script type="text/javascript" charset="utf-8" src="/static/editor/ueditor.config.js"></script>
        <script type="text/javascript" charset="utf-8" src="/static/editor/ueditor.all.js"> </script>
        <script type="text/javascript" charset="utf-8" src="/static/editor/lang/zh-cn/zh-cn.js"></script>
        <script>
            $(function(){
                  var ue = UE.getEditor('tucontent1',{
				                      autoFloatEnabled: false,//是否保持toolbar位置不懂
				                      toolbars:[[ 'Source', 'Undo', 'Redo','bold','test','underline','fontborder','strikethrough','superscript','subscript',

                            'removeformat', 'formatmatch' ,'autotypeset', 'blockquote', 'pasteplain', 'forecolor', 'backcolor',

                            'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']]
			          });
                      var ue = UE.getEditor('tucontent2',{
				                      autoFloatEnabled: false,//是否保持toolbar位置不懂
				                      toolbars:[[ 'Source', 'Undo', 'Redo','bold','test','underline','fontborder','strikethrough','superscript','subscript',

                            'removeformat', 'formatmatch' ,'autotypeset', 'blockquote', 'pasteplain', 'forecolor', 'backcolor',

                            'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']]
			          });
  
              });
			layui.use(['table', 'form', 'jquery','tag'], function() {
				let table = layui.table;
				let form = layui.form;
        let tag = layui.tag; 
				let $ = layui.jquery;

        
        
                　//自定义表单验证（金额）
                form.verify({
                    validateMoney: [
                    /^\d+(\.{0,1}\d+){0,1}$/ //正则表达式
                    ,'请输入正确的数字' //提示信息
                    ]
                });
                form.on('submit(form-save)', function (data) {
                    var data = $("#formId");
                    if("<?php echo htmlentities(app('request')->get('id')); ?>"==10 || "<?php echo htmlentities(app('request')->get('id')); ?>"==12){
                        //tabId1 tag-item  tabId1_input
                        var jsonObj=[];
                        $("#tabId1").find(".tag-item").each(function(){
                          var str=$(this).text();
                          //console.log($(this).find(".tag-close").text());
                          str=str.slice(0,-1);
                  
                          jsonObj.push(str);
                        });
                         var jsonStr=JSON.stringify(jsonObj);
                        $("#tabId1_input").val(jsonStr);
                    }
                 
                    postDatai("<?php echo url('basic/setUserconfig'); ?>?id=<?php echo htmlentities(app('request')->get('id')); ?>", data).then(function (res) {
                        if (res.code == 200) {
                            layer.msg(res.message, {
                                icon: 1,
                                time: 1000
                            }, function () {
                              parent.layui.admin.refreshThis()
                               return; 
                            });
                        } else {
                            layer.msg(res.message, {
                                icon: 2,
                                time: 1000
                            });
                        }
                    });
                    return false;
                });
           

			})
		</script>
</body>

<script>








    //     参数解释  
    //  url 地址  
    //  data  数据  
    //  alt 进度提示内容  
    //  ins 0 手动处理返回信息  1 自动处理返回信息
    //     co[辅助alt  co = 0时  进度条默认关闭  co = 1时  手动关闭进度条及之后弹框的内容]


    //带文件提交
    function postDatai(url, form, alt = "", ins = 0) {
        var p = new Promise(function (resolve, reject) {
            var formData = new FormData(form[0]);
            $.ajax({
                url: url,
                type: 'POST',
                data: formData,
                dataType: 'json',
                async: true,
                processData: false,
                contentType: false,
                success: function (res) {
                    if (res.code == -1) {
                        layer.alert(res.msg, {
                            title: "提示",
                            closeBtn: 0,
                            yes: function () {
                                location.reload();
                            }
                        });
                        return;
                    }
                    if (!ins) {
                        resolve(res);
                        return;
                    }
                    layer.alert(res.msg, {
                        title: "提示",
                        closeBtn: 0,
                        yes: function () {
                            res.code == 200 ? location.reload() : layer.close(layer.index);
                            return;
                        }
                    });


                },
                error: function (e) {
                    var res = $.parseJSON(e.responseText);
                    layer.alert(res.message, {
                        title: '提示',
                        closeBtn: 0,
                    });
                },
                beforeSend: function () {
                    if (alt) {
                        layer.msg(alt, { icon: 16, shade: 0.4, time: false });
                    }

                },
                complete: function () {
                    if (alt) {
                        layer.close(layer.index);
                    }
                }

            });
        })
        return p;
    }




    //普通提交--整改
    function postData(url, data, alt = "", ins = 0, co = 0) {
        var p = new Promise(function (resolve, reject) {
            $.ajax({
                url: url,
                data: data,
                header: { 'content-type': 'application/json' },
                type: 'POST',
                dataType: 'json',
                responseType: 'text',
                success: function (res) {
                    if (res.code == -1) {
                        layer.alert(res.message, {
                            title: "提示",
                            closeBtn: 0,
                            yes: function () {
                                location.reload();
                            }
                        });
                        return;
                    }
                    if (!ins) {
                        resolve(res);
                        return;
                    }
                    layer.alert(res.message, {
                        title: "提示",
                        closeBtn: 0,
                        yes: function () {
                            res.code == 200 ? location.reload() : layer.close(layer.index);
                            return;
                        }
                    });
                },
                fail: function (res) {
                    console.log(res);

                },
                error: function (e) {
                    var res = $.parseJSON(e.responseText);
                    layer.alert(res.message, {
                        title: '提示',
                        closeBtn: 0,
                    });
                },
                beforeSend: function () {
                    if (alt) {
                        layer.msg(alt, { icon: 16, shade: 0.4, time: false });
                    }

                },
                complete: function () {
                    if (alt && co) {
                        layer.close(layer.index);
                    }
                }

            })

        })
        return p;
    }



    function getObjectURL(file) {
		var url = null;
		if (window.createObjectURL != undefined) { // basic
			url = window.createObjectURL(file);
		} else if (window.URL != undefined) { // mozilla(firefox)
			url = window.URL.createObjectURL(file);
		} else if (window.webkitURL != undefined) { // webkit or chrome
			url = window.webkitURL.createObjectURL(file);
		}
		return url;
	}
</script>

</html>